<template>
	<view class="smart-container">
		<view class="smart-panel-title">1.容器</view>
		<view class="smart-panel-h" @click="goDatailPage('view')"><text>view视图</text></view>
		<view class="smart-panel-h" @click="goDatailPage('scroll-view')"><text>scroll-view滚动视图</text></view>
		<view class="smart-panel-h" @click="goDatailPage('swiper')"><text>swiper可滑动视图</text></view>
		
		<view class="smart-panel-title">2.基础内容</view>
		<view class="smart-panel-h" @click="goDatailPage('text')"><text>text文本编辑</text></view>
		<view class="smart-panel-h" @click="goDatailPage('rich-text')"><text>rich-text富文本编辑</text></view>
		<view class="smart-panel-h" @click="goDatailPage('progress')"><text>progress进度条</text></view>
		<view class="smart-panel-h" @click="goPage('article')"><text>我的文章</text></view>
		
				<!-- 3. 表单组件 -->
		<view class="smart-panel-title">3.表单组件</view>
				<!-- 【添加这里】 -->
		<view class="smart-panel-h" @click="goDatailPage('button')"><text>1.button</text></view>
		<view class="smart-panel-h" @click="goDatailPage('radio')"><text>2.radio</text></view>
		<view class="smart-panel-h" @click="goDatailPage('checkbox')"><text>3.checkbox</text></view>
		<view class="smart-panel-h" @click="goDatailPage('input')"><text>4.input</text></view>
		<view class="smart-panel-h" @click="goDatailPage('picker')"><text>5.picker</text></view>
				<!-- 剩下的组件先放着，但不可点 -->
		<view class="item-obj-disabled"><text>6.slider</text></view>
		<view class="item-obj-disabled"><text>7.switch</text></view>
		<view class="item-obj-disabled"><text>8.textarea</text></view>
		<view class="item-obj-disabled"><text>9.form</text></view>
		<view class="smart-panel-h" @click="goPage('register')">10.简单注册</view>
		
		<view class="smart-panel-title"><text class="item-title">4. 其他组件</text></view>
		<view class="smart-panel-h" @click="goDatailPage('navigator')"><text>1. navigator</text></view>
		<view class="smart-panel-h" @click="goDatailPage('image')"><text>2. image</text></view>
		<view class="smart-panel-h" @click="goDatailPage('video')"><text>3. video</text></view>
		<view class="smart-panel-h" @click="goDatailPage('map')"><text>4. map</text></view>
		<view class="smart-panel-h" @click="goPage('campus')"><text>我的校园</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			goDatailPage(e){
				if(typeof e == 'string') {
					uni.navigateTo({
						url:'/pages/components/' + e + '/' + e,
					
					});

				}else{
					uni.navigateTo({
						url: e.url
					})
				}
			},
			goPage(e){
					uni.navigateTo({
						url:'/pages/homework/' + e + '/' + e,
					
					});
			}
		}
	}
</script>

<style>
	.item-obj-disabled {
		/* 复制 .item-obj 的样式 */
		margin-bottom: 12px;
		background-color: #fdfdfd;
		padding: 10px;
		border-radius: 5px;
		/* ... 其他 .item-obj 样式 ... */
		
		/* 禁用效果 */
		color: #999;
		opacity: 0.6;
		}

</style>